Ext.ns('waves', 'waves.views');

Ext.setup({
	statusBarStyle: 'black',
    icon: 'icon.png',
    glossOnIcon: false,
    onReady: function() {	
		waves.App = new waves.App({
			title: 'Waves 1.0',
			shortUrl: 'waves'
		});
    }
});

waves.App = Ext.extend(Ext.TabPanel, {
    
    fullscreen: true,
	tabBar: {
		dock: 'top',
		scroll: 'horizontal',
		sortable: true,
		layout: {
			pack: 'center'
		}
	},    
    cardSwitchAnimation: false,
    
    initComponent: function() {

		if (navigator.onLine) {
            this.items = [{
                xtype: 'beachlist',
                title: 'Ondas',
                confTitle: this.title,
                shortUrl: this.shortUrl
            },{
                title: 'Twitter',
                confTitle: this.title,
                shortUrl: this.shortUrl
            }];
        } else {
            this.on('render', function(){
                this.el.mask('No internet connection.');
            }, this);
        }
		
        waves.cfg = {};
        waves.cfg.title = this.title;
        
        waves.App.superclass.initComponent.call(this);
    } 
});









